Migrate credentials to LabKey native SSM integration (26.6+)#184
Open
labkey-willm wants to merge 2 commits into
Open
Migrate credentials to LabKey native SSM integration (26.6+)#184labkey-willm wants to merge 2 commits into
labkey-willm wants to merge 2 commits into
Conversation
Replace ECS-injected credential secrets (POSTGRES_USER, POSTGRES_PASSWORD, LABKEY_EK, SMTP_USER, SMTP_PASSWORD) with LabKey's native SSM integration via AwsParameterStoreEnvironmentPostProcessor: - application.properties: add context.awsParameterStore.prefix and ssm: references for the 5 credentials; old @@Placeholder@@ lines kept as comments for non-AWS reference - entrypoint.sh: add SSM prefix normalization and non-AWS fallback (replaces ssm: references with direct env var values when LABKEY_SSM_PREFIX is unset); remove AWS credential unset so JVM can reach SSM; remove credential sed/unset - docker-compose.yml: add LABKEY_SSM_PREFIX, LABKEY_VPC_SSM_PREFIX, AWS credential forwarding, and direct credential fallbacks for non-AWS local use - README.md, CLAUDE.md: document SSM integration, updated env var tables, updated runtime flow description⚠️ HOLD until LabKey/server#1388 merges. Targets develop / LabKey 26.6+. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
ERROR: A pull request from |
POSTGRES_PASSWORD and POSTGRES_USER in LabKey services now default to localdevpassword/postgres, matching the postgres service defaults, so make up works without setting any env vars. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
labkey-gokhano
approved these changes
Jun 1, 2026
labkey-gokhano
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
application.properties: addscontext.awsParameterStore.prefixandssm:references for DB credentials, encryption key, and SMTP credentials; old@@placeholder@@lines kept as comments for non-AWS referenceentrypoint.sh: adds SSM prefix normalization and non-AWS fallback (substitutesssm:references with direct env var values whenLABKEY_SSM_PREFIXis unset); removes AWS credential unset so the JVM can reach SSM; removes credential sed/unset linesdocker-compose.yml: addsLABKEY_SSM_PREFIX,LABKEY_VPC_SSM_PREFIX, AWS credential forwarding, and direct credential fallbacks for non-AWS/local useREADME.md,CLAUDE.md: document SSM integration, updated env var tables, updated runtime flow descriptionHow it works
Set
LABKEY_SSM_PREFIX(app-level, e.g./myapp/myenv/) andLABKEY_VPC_SSM_PREFIX(VPC-level, e.g./shared/vpc/myvpc/) as plain env vars. LabKey'sAwsParameterStoreEnvironmentPostProcessorresolves the following at JVM startup:${LABKEY_SSM_PREFIX}database_userPOSTGRES_USER${LABKEY_SSM_PREFIX}database_passwordPOSTGRES_PASSWORD${LABKEY_SSM_PREFIX}ekLABKEY_EK${LABKEY_VPC_SSM_PREFIX}smtp_userSMTP_USER${LABKEY_VPC_SSM_PREFIX}smtp_passwordSMTP_PASSWORDWhen
LABKEY_SSM_PREFIXis unset,entrypoint.shfalls back to direct env var substitution — non-AWS deployments are unaffected.Do not merge until LabKey/server#1388 is merged. That PR contains the server-side fix required for
GEMINI_API_KEYresolution via SSM. This change targets develop / LabKey 26.6+.The companion Terraform change is in
terraform_module_ecs_service_lkappsbranch26.6_fb_ssm_credential_migration— deploy the Dockerfile image change first, then land the Terraform change.Test plan
lk-dev-banana/banana-ecsSSM paths (DB user, DB password, EK, SMTP user, SMTP password all resolved from SSM per container logs)GEMINI_API_KEYresolved via SSM (requires server PR #1388)make upstill works without SSM vars set🤖 Generated with Claude Code